<%@page import="java.util.Date"%>
<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<%
Date date = new Date();

Calendar cal = Calendar.getInstance();

cal.get(Calendar.MONTH);
cal.get(Calendar.DATE);
int month =cal.get(Calendar.MONTH)+1;
request.setAttribute("month", month);
request.setAttribute("day", cal.getMaximum(Calendar.DATE));

%>
<body>
<table border="1">
<thead><b>${month}<a onclick=""> -> </a></b></thead>
<tr>
	<td></td>
</tr>
<tr>
<c:forEach begin="1" end="${day}" var="da">
<c:if test="${da%7 eq 1 and da ne 1 }">
</tr><tr>
</c:if>
<td>${da}</td>
</c:forEach>
</tr>
</table>

</body>
</html>
